package transforms;

import com.rshacking.rhf.files.ClassContainer;
import com.rshacking.rhf.updater.Transform;
import com.rshacking.rhf.updater.hooks.HooksList;

public class CanvasTransform extends Transform {

    @Override
    public boolean canActivate(final HooksList hooks, final ClassContainer cc) {
        return cc.getASM().superName.equals("java/awt/Canvas");
    }

    @Override
    public boolean execute(final HooksList hooks, final ClassContainer cc) {
        hooks.add("Canvas", cc.getName());
        return true;
    }
}
